public final class SyslogTraceWriter extends BaseTraceWriter
SyslogTraceWriter
refines the BaseTraceWriter
to allow tracing to
syslog. Cisco syslog specification calls for sending low level traces to a syslog collector in
the form of UDP messages. No buffering is done in this TraceWriter. The
SyslogTraceWriter
makes an exception to the println() method in that it places a
'\0' instead of a System specified line seperator to terminate the message packet.Constructor and Description |
---|
SyslogTraceWriter(int port,
java.lang.String collector)
Default SyslogTraceWriter with a max trace level of INFORMATIONAL
|
SyslogTraceWriter(int port,
java.lang.String collector,
int maxTraceLevel)
SyslogTraceWriter with max trace level specified
|
SyslogTraceWriter(int port,
java.lang.String collector,
int[] traceLevels)
SyslogTraceWriter which takes an array of trace levels.
|
Modifier and Type | Method and Description |
---|---|
void |
doClose()
Closes the socket
|
protected void |
doPrintln(java.lang.String message,
int messageNumber)
The
SyslogTraceWriter makes an exception to the println() method in that it
places a '\0' instead of a System specified line seperator to terminate the message packet. |
static void |
main(java.lang.String[] args) |
close, doFlush, flush, getDescription, getEnabled, getName, getTraceLevels, println, setTraceLevels, toString
public SyslogTraceWriter(int port, java.lang.String collector)
Trace
public SyslogTraceWriter(int port, java.lang.String collector, int maxTraceLevel)
Trace
public SyslogTraceWriter(int port, java.lang.String collector, int[] traceLevels)
Trace
public void doClose()
doClose
in class BaseTraceWriter
protected void doPrintln(java.lang.String message, int messageNumber)
SyslogTraceWriter
makes an exception to the println() method in that it
places a '\0' instead of a System specified line seperator to terminate the message packet.
The portion of the message after a '\r' or '\n' is ignoreddoPrintln
in class BaseTraceWriter
public static void main(java.lang.String[] args)